package com.jack.vipmis.vip.api.util;

import java.util.Set;

import com.alibaba.fastjson.serializer.JSONSerializer;
import com.alibaba.fastjson.serializer.SerializeWriter;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.serializer.SimplePropertyPreFilter;
import com.jack.vipmis.vip.card.entity.Discount;

public class JsonUtil {

	/**
	 * 
	 * @param obj
	 * @return
	 */
	public static String ObjectToJson(Object obj) {
		SimplePropertyPreFilter filter=new SimplePropertyPreFilter();
		 Set<String> includes =  filter.getIncludes();
		 includes.add("");
		SerializeWriter out = new SerializeWriter();
		JSONSerializer serializer = new JSONSerializer(out);
		serializer.writeWithFieldName(obj, "business");
		return out.toString();
	}
}
